<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>优永动助手 - 分享</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="/layui/layui.all.js"></script>
    <link rel="stylesheet" href="/css/blog.css">
    <script src="https://cdn.jsdelivr.net/clipboard.js/1.5.12/clipboard.min.js"></script>
    <style>
        .fenxiang-main {
            background-image: url('../images/fenxiangbg2.jpg');
            background-repeat: no-repeat;
            background-size: 100% 100%;
            -moz-background-size: 100% 100%;
            height: 1800px;
            width: 100%;
        }

        .search-main {
            background-color: unset;
        }

        .yaoqingma {
            font-size: 80px;
            color: black;
            margin-top: 100px;
            text-align: center;

        }
        #copy_btn{
            width: 80%;
            font-size: 36px;
            height: 60px;
            background-color: unset;
        }
        .log-title{
            color: white;
        }

    </style>
</head>
<body>

<div class="layui-row search-main log-title">

    <div class="layui-col-xs2" onclick="history.go(-1)">
        <i class="layui-icon layui-icon-left return-btn"></i>
    </div>

    <div class="layui-col-xs2 layui-col-xs-offset3">分享</div>

</div>


<div class="layui-row fenxiang-main" th:style="'background-image:url(../'+${fenxiang.address}+')'">



    <div class="layui-col-xs6 layui-col-xs-offset3 yaoqingma" style="color: white;margin-top: 86%;">
        <div class="layui-row">邀请码</div>

        <div id="target" class="layui-row required input-xlarge" th:text="${userDO.yaoqingma}"></div>


         <input type="button" name="" data-clipboard-action="copy" data-clipboard-target="#target" id="copy_btn"
                value="一键复制" style="color: white;">

        <div class="layui-row" style="margin-top: 36px;">
            <img src="/images/erweima.png" width="400px" height="400px">
        </div>
    </div>

</div>




</div>
</body>


<script>
    $(document).ready(function () {
        var targetText = $("#target").text();
        var clipboard = new Clipboard('#copy_btn');
        clipboard.on('success', function (e) {
            layui.use('layer', function(){
                var $ = layui.jquery, layer = layui.layer;
                layer.msg("复制成功");
            });
            e.clearSelection();
        });
    });
</script>
</html>